module LWA
  class ValueProcessor
    def initialize(keeper_file)
      @keeper = YAML.load_file(keeper_file)
    end

    private

    def get_value_from_keeper(key_string)
      temp = @keeper
      key_string.split(".").each do |each_key|
        temp = temp.fetch(each_key)
      end
      return temp
    end

    public

    def get_value(para_name)
#      if !para_name.empty?
        if para_name[0,1] != "#"
          return para_name
        else
          return get_value_from_keeper(para_name.delete!("#"))
        end
#      end
    end

  end
end